<?php 
## include required files
/*******************************/
require_once '../model/paypal.php';
require_once '../model/moduleuser.php';
## Paginaton class
require_once ("../includes/classes/pagination_class.php");
/*******************************/

## Create Objects
/*******************************/
$paypalObj   = new Model_Paypal();
$moduleObj = new Model_ModuleUser();
/*******************************/

## Get id from the url 
if($_GET['id']!='') {
	$id  = base64_decode($_GET['id']);
}

$res = $paypalObj->getDetailsFromPaypalById($id);
//echo "<pre>";print_r($res);exit;
$smarty->assign('payPalArray', $res[0]);

## Assign session message to smarty variable and unset session variable
if($_SESSION['msg'] != '') {
	$smarty->assign('msg', $_SESSION['msg']);	
	unset($_SESSION['msg']);
}

## Set active class variable for left menu (main menu and sub menu)
$smarty->assign('activeclass', 'paypal');
$smarty->assign('mainmenu', '5');

## Unset all the objects created which are on this page
unset($paypalObj);
unset($moduleObj);

$smarty->display(TEMPLATEDIR_ADMIN. 'paypal/paypaldetails.tpl');
unset($smarty);
?>